﻿#ifndef EX_RECEIVER_H
#define EX_RECEIVER_H

#include "sp_env.h"

#define P_Ring "ring"
#define P_Pop "pop"
#define P_Say "say"
#define P_Emer "emer"
#define P_Speech "speech"

#define RECV_PORT 23323
//23323 消息端口

enum PT_Type
{
    PT_Ring=0x11,
    PT_Pop=0x12,
    PT_Say=0x13,
    PT_Emer=0x14,
    PT_Speech=0x15
};

class Receiver : public QObject
{
    Q_OBJECT
public:
    explicit Receiver(QObject *parent = 0);

    void processPendingDatagram();
    QString title,content;
    // type,part;

signals:
    void received();

private:
    QUdpSocket *receiver;
};

#endif // EX_RECEIVER_H
